package com.ophelisis.persistence.dao.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.ophelisis.ibatis.handler.handler_category;
import com.ophelisis.persistence.dao.CategoryDAO;
import com.ophelisis.persistence.domain.CategoryVO;

/**
 * <pre>
 * Class : com.ophelisis.persistence.dao.impl.CategoryDAOImpl / CategoryDAOImpl.java
 * 	Define Class Object : 
 * <br>
 * </pre>
 * @author hwanLee / apexcns,Inc.
 * @version 1.0
 * @see javadoc
 * @since 2013. 07. 29.
 */
@Repository
public class CategoryDAOImpl implements CategoryDAO {
	@Override
	public List<CategoryVO> getCategoryList() throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.getCategoryList();
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}
	}

	@Override
	public List<CategoryVO> getCategoryList(Map<String, Object> params) throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.getCategoryList(params);
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}
	}

	@Override
	public Integer setCategoryDelete(CategoryVO paramVO) throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.setCategoryDelete(paramVO);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer setCategoryModify(CategoryVO paramVO) throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.setCategoryModify(paramVO);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer setCategoryModifyMenuGroupId(Map<String, Object> params) throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.setCategoryModifyMenuGroupId(params);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer setCategoryAdd(CategoryVO paramVO) throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.setCategoryAdd(paramVO);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}

	@Override
	public Integer existCategory(Map<String, Object> params) throws DataAccessException, SQLException, Exception {
		try {
			return handler_category.existCategory(params);
		} catch (SQLException e) {
			e.printStackTrace();
			return 0;
		}
	}
}
